package com.boot.unity.api.wx.controller;

import com.boot.unity.api.wx.entity.TrainUserHt;
import com.boot.unity.api.wx.service.WxClassTypeService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 班型服务
 */
@RestController
@RequestMapping("/wx/classType")
@Validated
public class WxClassTypeController {
    private final Log logger = LogFactory.getLog(WxClassTypeController.class);

    @Autowired
    private WxClassTypeService classTypeService;


    @GetMapping("queryHtByUserIdAndClassId")
    public Object queryHtByUserIdAndClassId(String userId,String classId){
       return classTypeService.queryHtByUserIdAndClassId(userId,classId);
    }

    @PostMapping("saveUserHt")
    public Object saveUserHt(@RequestBody TrainUserHt trainUserHt){
        return classTypeService.saveUserHt(trainUserHt);
    }


    /**
     * 获取全部班型信息
     *
     * @return
     */
    @GetMapping("list")
    public Object list(String val) {
        return classTypeService.list(val);
    }


}
